package com.project.forlearningdemo.dao;

import com.project.forlearningdemo.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface UserMapper {

    //查询用户 根据账号或邮箱号或id(任选一个，其他为空就好了)
    User queryUser(@Param("userId") Integer userId, @Param("username") String username, @Param("mail") String mail);

    //修改用户
    boolean updateUser(@Param("user")User user);

    //增加用户
    boolean insertUser(@Param("user")User user);

    //删除用户
    boolean deleteUser(@Param("userId")Integer userId);
}
